﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EA.DAO
{
    public class ProductImageDA : ObjectDA
    {
        public ProductImageDA(String connection_string)
            : base(connection_string)
        {

        }

        public DataTable GetUrlByProductID(int productID)
        {
            String query = "SELECT * FROM ProductImage WHERE productId=@productId";
            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@productId", productID);
            DataTable table = new DataTable();
            this.Fill(query, param, table);
            return table;
        }

    }
}
